﻿//-----------------------------------------------------------------------
// <copyright file="IMapper.cs" company="OverrideThis">
//     Copyright (c) 2010 OverrideThis.com
// </copyright>
//-----------------------------------------------------------------------
namespace OverrideThis.Core.Infrastucture.Mapper
{
    /// <summary>
    /// Contract that should be implemented
    /// to abstract away the concrete implementation
    /// of the mapping technology 
    /// being used.
    /// </summary>
    public interface IMapper
    {
        /// <summary>
        /// Instantiates an object of type TTo
        /// and populates its data using data from an
        /// object of type TFrom.
        /// </summary>
        /// <typeparam name="TFrom">Type of object being mapped from.</typeparam>
        /// <typeparam name="TTo">Type of object beign mapped to.</typeparam>
        /// <param name="value">Object being translated</param>
        /// <returns>Instance of TTo deliveded.</returns>
        TTo Map<TFrom, TTo>(TFrom value);
    }
}